The present invention relates broadly to cryptographic methods and devices, and in particular to stream cipher and block cipher methods used in these methods and devices. This invention is also applicable in other fields, such as pseudo-random number generators, used by algorithms that require random numbers. Cryptographic devices and methods are generally used to encrypt and decrypt information transmitted through communication and transmission systems. However, they also may be used to encrypt passive data stored on a computer or another physical device such as a tape drive. Typically, the message is encrypted by a sending agent using a unique key, and the encrypted message, called ciphertext, is transmitted to a receiving agent. Using the same unique key, the receiving agent applies a decryption device or method to the ciphertext. The output of this decryption device or method is the same message that the sending agent gathered before encrypting and sending it.